<?php


namespace app\api\model;


use think\Model;

class Score extends Model
{
    /**
     * 根据用户id获取该用户的积分
     *
     * @param $id
     * @return array|bool|\PDOStatement|string|Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */

    public function getScore($id)
    {
        $score = $this->where('user_id', $id)->field('user_score')->find();
        return $score;
    }
}